home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-07-28 | 8.0 KB | 247 lines | [TEXT/MPS ] |
- // --------------------------------------------------------------------------
- // LDAP Directory Record • Aspect Template
-
- #define kCatalogAspectName "SKEL•SetUp Aspect"
- #define kCatalogInfoPageName "SKEL•SetUp InfoPage"
-
- #define kCatalogRecordType kDirectoryRecTypeBody "ldaP"
- #define kSignature 'ldaP'
-
- #define kPr_ldapServerName (kSAMFirstDevProperty + 0)
- #define kPr_ldapServerNameIndex (kSAMFirstDevProperty + 1)
- #define kPr_ldapSearchBase (kSAMFirstDevProperty + 2)
- #define kPr_ldapSearchBaseIndex (kSAMFirstDevProperty + 3)
-
-
- resource 'deta' (ldapSetupAspectID, kCatalogAspectName, purgeable) {
- 0, dropCheckConflicts, isMainAspect
- };
-
- resource 'rstr' (ldapSetupAspectID + kDETTemplateName, "SKEL•SetUp Aspect Name", purgeable) {
- kCatalogAspectName
- };
-
- resource 'rstr' (ldapSetupAspectID + kDETRecordType, "SKEL•SetUp Aspect Record Type", purgeable) {
- kCatalogRecordType // "aoce Directory"…"ldaP"
- };
-
- resource 'rstr' (ldapSetupAspectID + kDETAspectKind, "SKEL•SetUp Aspect Kind", purgeable) {
- "X.500 Catalog" // used for "Get Info..."
- };
-
- resource 'rstr' (ldapSetupAspectID + kDETAspectName, "SKEL•SetUp Aspect Name", purgeable) {
- "« Aspect-Name »" // ... Key Chain 'system' field
- };
-
- resource 'rstr' (ldapSetupAspectID + kDETAspectWhatIs, "SKEL•SetUp Aspect WhatIs", purgeable) {
- "Contains information about this key, which represents an X.500 catalog "
- "connected to by the TCP/IP Lightweight Directory Access Protocol (LDAP)."
- };
-
- resource 'rst#' (ldapSetupAspectID + kDETAspectBalloons, "SKEL•SetUp Aspect Balloons", purgeable) {
- {
- "Click this to set something.", "ERROR",
- "Press this button to bind to an LDAP server.", "ERROR"
- }
- };
-
- resource 'dett' (ldapSetupAspectID + kDETAspectLookup, "SKEL•SetUp Aspect Lookup", purgeable) {
- {
- { "ldapServerName" }, typeBinary,
- useForInput, useForOutput, notInSublist, isNotAlias, isNotRecordRef,
- {
- 'rstr', kPr_ldapServerName, 0;
- 'long', kPr_ldapServerNameIndex, 0;
- },
-
- { "ldapSearchBase" }, typeBinary,
- useForInput, useForOutput, notInSublist, isNotAlias, isNotRecordRef,
- {
- 'rstr', kPr_ldapSearchBase, 0;
- 'long', kPr_ldapSearchBaseIndex, 0;
- }
- }
- };
-
- resource 'rstr' (ldapSetupAspectID + kSAMAspectUserName, purgeable) {
- "« User-Name »" // ... Key Chain 'name' field
- };
-
- resource 'rstr' (ldapSetupAspectID + kSAMAspectKind, purgeable) {
- "X.500 Catalog" // ... Key Chain 'kind' field
- };
-
- resource 'detn' (ldapSetupAspectID + kSAMAspectCannotDelete, purgeable) {
- 0;
- };
-
- resource 'sami' (ldapSetupAspectID + kSAMAspectSlotCreationInfo, purgeable) {
- 1, kSignature, notMSAM, servesDSAM,
- "X.500 Catalog", "Unbound X.500 Catalog"
- };
-
- include "SKEL•CSAM.DETC" 'detc'(0) as 'detc'(ldapSetupAspectID + kDETAspectCode, purgeable);
-
- include "SKEL•CSAM.ICON" 'ICN#' (129) as 'ICN#' (ldapSetupAspectID + kDETAspectMainBitmap, "SKEL•SetUp InfoPage", purgeable);
- include "SKEL•CSAM.ICON" 'ics#' (129) as 'ics#' (ldapSetupAspectID + kDETAspectMainBitmap, "SKEL•SetUp InfoPage", purgeable);
- include "SKEL•CSAM.ICON" 'icl8' (129) as 'icl8' (ldapSetupAspectID + kDETAspectMainBitmap, "SKEL•SetUp InfoPage", purgeable);
- include "SKEL•CSAM.ICON" 'ics8' (129) as 'ics8' (ldapSetupAspectID + kDETAspectMainBitmap, "SKEL•SetUp InfoPage", purgeable);
- include "SKEL•CSAM.ICON" 'icl4' (129) as 'icl4' (ldapSetupAspectID + kDETAspectMainBitmap, "SKEL•SetUp InfoPage", purgeable);
- include "SKEL•CSAM.ICON" 'ics4' (129) as 'ics4' (ldapSetupAspectID + kDETAspectMainBitmap, "SKEL•SetUp InfoPage", purgeable);
-
- include "SKEL•CSAM.ICON" 'SICN' (129) as 'SICN' (ldapSetupAspectID + kDETAspectMainBitmap, "SKEL•SetUp InfoPage", purgeable);
-
- #define serverNameMenuID 1000
- #define searchBaseMenuID 1001
-
- resource 'fmnu' (serverNameMenuID) {
- kPr_ldapServerNameIndex,
- {
- 1, "« you must choose a server name »";
- 2, "ldap.itd.umich.edu";
- 3, "x500.gsfc.nasa.gov";
- #ifdef EXTRAHOSTS
- 4, "rearwindow.rs.itd.umich.edu";
- 5, "letham.uis.itd.umich.edu";
- 6, "wp.trw.com";
- 7, "ldap.LBL.Gov";
- 8, "ldap2.LBL.Gov";
- #endif
- }
- };
-
- resource 'fmnu' (searchBaseMenuID) {
- kPr_ldapSearchBaseIndex,
- {
- 1, "« you must choose a search base »";
- 2, "o=university of michigan, c=us";
- 3, "o=national aeronautics and space administration, c=us";
- #ifdef EXTRAHOSTS
- 4, "o=\"apple computer, inc.\", c=us";
- 5, "o=\"trw inc.\", c=us";
- 6, "o=lawrence berkeley laboratory, c=us"
- #endif
- }
- };
- //eject
- // --------------------------------------------------------------------------
- // LDAP Directory Record • InfoPage Template
-
- // +---------x---------x---------x---------+
- // | +---+ |
- // | | | |
- // | +---+ |
- // serverName: -> | [_________] [__________________] |
- // searchBase: -> | [___110___] [_______207________] |
- // | |
- // | |
- // | |
- // | |
- // | |
- // | |
- // | |
- // +---------x---------x---------x---------+
-
- #define GapW 2
- #define c1W 110
- #define c2W 207
-
- #define GapH 22
- #define statH 18
- #define editH 17
-
- #define c1L 42
- #define c1R c1L+c1W
- #define c2L c1R+GapW
- #define c2R c2L+c2W
-
- #define snT 58
-
- #define cnLabelRect {snT, c1L, snT+statH, c1L+c1W}
- #define cnPopupRect {snT-2, c2L, snT-2+editH, c2R}
- #define cnFieldRect {snT-2+64, c2L, snT-2+editH+64, c2R}
-
- #define sbT snT+GapH
-
- #define onLabelRect {sbT, c1L, sbT+statH, c1R}
- #define onPopupRect {sbT-2, c2L, sbT-2+editH, c2R}
- #define onFieldRect {sbT-2+64, c2L, sbT-2+editH+64, c2R}
-
-
- resource 'deti' (ldapSetupInfoPageID, kCatalogInfoPageName, purgeable) {
- 1000, // sort order
- kDETNoSublistRect, // sublist rectangle
- noSelectFirstText,
- { // header view lists
- kDETNoProperty, kDETNoProperty,
- ldapSetupInfoPageID
- },
- { } // subview view lists
- };
-
- resource 'detv' (ldapSetupInfoPageID, kCatalogInfoPageName, purgeable) {
- {
- kDETSubpageIconRect, kDETNoFlags, kDETAspectMainBitmap,
- Bitmap
- { kDETLargeIcon },
-
- {45, 0, 46, kDETRecordInfoWindWidth}, kDETNoFlags, kDETNoProperty,
- Box
- { kDETBoxIsGrayed },
-
- // -- serverName popup menu
-
- cnLabelRect, kDETNoFlags, kDETNoProperty,
- StaticTextFromView
- { kDETApplicationFont, 10, kDETRight, kDETBold, "ldapServerName:" },
-
- cnPopupRect, kDETEnabled, kPr_ldapServerNameIndex,
- Menu
- { kDETApplicationFont, 10, kDETLeft, kDETNormal,
- "", kPr_ldapServerNameIndex, serverNameMenuID },
-
- // -- searchBase popup menu
-
- onLabelRect, kDETNoFlags, kDETNoProperty,
- StaticTextFromView
- { kDETApplicationFont, 10, kDETRight, kDETBold, "ldapSearchBase:" },
-
- onPopupRect, kDETEnabled, kPr_ldapSearchBaseIndex,
- Menu
- { kDETApplicationFont, 10, kDETLeft, kDETNormal,
- "", kPr_ldapSearchBaseIndex, searchBaseMenuID },
-
- #define kfT 200
- {kfT, 8, kfT+12, kDETRecordInfoWindWidth-8}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView
- { kDETApplicationFont, 9, kDETCenter, kDETNormal,
- "Copyright © 1993 "
- "The Regents of the University of Michigan. "
- "All Rights Reserved." },
-
- {kfT+13, 8, kfT+25, kDETRecordInfoWindWidth-8}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView
- { kDETApplicationFont, 9, kDETCenter, kDETNormal,
- "Version " VERSION " | Gavin Eadie (Internet: Gavin@UMich.EDU | AppleLink: A67)" }
- }
- };
-
- resource 'rstr' (ldapSetupInfoPageID + kDETTemplateName, "SKEL•SetUp InfoPage Name", purgeable) {
- kCatalogInfoPageName
- };
-
- resource 'rstr' (ldapSetupInfoPageID + kDETRecordType, "SKEL•SetUp InfoPage Record Type", purgeable) {
- kCatalogRecordType
- };
-
- resource 'rstr' (ldapSetupInfoPageID + kDETInfoPageName, "SKEL•SetUp InfoPage Name", purgeable) {
- "X.500 Catalog"
- };
-
- resource 'rstr' (ldapSetupInfoPageID + kDETInfoPageMainViewAspect, "SKEL•SetUp InfoPage Main View", purgeable) {
- kCatalogAspectName
- };
-
- #undef ldapSetupAspectID
- #undef ldapSetupInfoPageID
-